<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Role extends Base
{
    use HasFactory;
    protected $guarded = [];

    // 角色与权限
    public function permissions() {

        return $this->belongsToMany(Permissions::class,'role_permissions','role_id','permissions_id');
    }

}
